﻿using System;
using System.Collections.Generic;
using System.Text;
using Meqs.Entity;

namespace Meqs.Logic.Interface
{
    public interface IGlobalCauseInfoLogic : ICommonLogic<GlobalCauseInfo, int>
    {
        /// <summary>
        /// 查询指定的GlobalCauseInfo
        /// </summary>
        /// <param name="idList"></param>
        /// <param name="schoolMark"></param>
        /// <returns></returns>
        IList<GlobalCauseInfo> FindGlobalCauseInfoByIdList(string idList, string schoolMark);


        /// <summary>
        /// 查找指定学校的课程
        /// </summary>
        /// <param name="schoolMark"></param>
        /// <returns></returns>
        IList<GlobalCauseInfo> SelectSchoolCause(string schoolMark);

        /// <summary>
        /// 查找指定学校的有效课程
        /// </summary>
        /// <param name="schoolMark"></param>
        /// <returns></returns>
        IList<GlobalCauseInfo> SelectSchoolCause(string schoolMark, int isEffect);

        /// <summary>
        /// 获取局级考试的课程
        /// </summary>
        /// <param name="examId"></param>
        /// <returns></returns>
        IList<GlobalCauseInfo> SelectEduExamCause(int examId);

        /// <summary>
        /// 获取校考试的课程
        /// </summary>
        /// <param name="examId"></param>
        /// <param name="schoolmark"></param>
        /// <returns></returns>
        IList<GlobalCauseInfo> SelectSchoolExamCause(int examId, string schoolmark);
        /// <summary>
        /// 获取最大的课程编号
        /// </summary>
        /// <returns></returns>
        int InsertNewCause(GlobalCauseInfo gcInfo, string schoolMark);

        /// <summary>
        /// 根据状态，上移或者下移课程编号
        /// </summary>
        /// <param name="iCauseNO"></param>
        /// <param name="iState"></param>
        /// <returns></returns>
        int ExchangeCauseNO(GlobalCauseInfo gcInfo1, GlobalCauseInfo gcInfo2);

        /// <sammury>
        /// 更新对象的名称
        /// </sammury>
        /// <param name="entity"></param>
        /// <returns></returns>
        int UpdateCauseName(GlobalCauseInfo entity);

        /// <summary>
        /// 修改课程的有效状态
        /// </summary>
        /// <param name="isEffect"></param>
        /// <param name="RID"></param>
        /// <returns></returns>
        int UpdateIsEffect(int isEffect, int RID);


        /// <summary>
        /// 根据课程RID以及移动状态，来上移或者下移课程编号
        /// </summary>
        /// <param name="iState"></param>
        /// <param name="iRID"></param>
        /// <returns></returns>
        int ExchangeCuaseNo(int iState, int iRID);
    }
}
